﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Prism.ViewModel;
using DIST.LR.ZHJG.Controls.Navigation;
using System.Collections.ObjectModel;
using System.Collections.Generic;

namespace DIST.LR.ZHJG.Navigation
{
    public class ZbglNavigationViewModel : NotificationObject
    {
        private ObservableCollection<CatagoryInfo> _zbglNavDataSource;
        public ObservableCollection<CatagoryInfo> zbglNavDataSource
        {
            get { return this._zbglNavDataSource; }
            set
            {
                if (this._zbglNavDataSource != value)
                {
                    this._zbglNavDataSource = value;
                    this.RaisePropertyChanged("zbglNavDataSource");
                }
            }
        }

        private CatagoryInfo _zbglNavDataSourceXz;
        public CatagoryInfo zbglNavDataSourceXz
        {
            get { return this._zbglNavDataSourceXz; }
            set
            {
                if (this._zbglNavDataSourceXz != value)
                {
                    this._zbglNavDataSourceXz = value;
                    this.RaisePropertyChanged("zbglNavDataSourceXz");
                }
            }
        }

        public ZbglNavigationViewModel()
        {
            ObservableCollection<CatagoryInfo> lst = new ObservableCollection<CatagoryInfo>();
            
            #region 新增
            CatagoryInfo z_info = new CatagoryInfo() { Name = "指标", Index = "10" };
            z_info.SubIndexInfos.Add(new IndexInfo() { Name = "指标类型", Index = "11" });
            z_info.SubIndexInfos.Add(new IndexInfo() { Name = "指标配置", Index = "12" });
            z_info.SubIndexInfos.Add(new IndexInfo() { Name = "指标值记录", Index = "13" });
            z_info.SubIndexInfos.Add(new IndexInfo() { Name = "指标来源", Index = "14" });
            z_info.SubIndexInfos.Add(new IndexInfo() { Name = "指标分类配置", Index = "15" });
            z_info.SubIndexInfos.Add(new IndexInfo() { Name = "指标分类值配置", Index = "16" });
            CatagoryInfo yh_info = new CatagoryInfo() { Name = "用户", Index = "20" };
            yh_info.SubIndexInfos.Add(new IndexInfo() { Name = "管理员", Index = "21" });
            yh_info.SubIndexInfos.Add(new IndexInfo() { Name = "普通用户", Index = "22" });
            yh_info.SubIndexInfos.Add(new IndexInfo() { Name = "临时用户", Index = "23" });

            CatagoryInfo xz_info = new CatagoryInfo() { Name = "新增" };
            xz_info.SubCatagorys.Add(z_info);
            xz_info.SubCatagorys.Add(yh_info);
            lst.Add(xz_info); 
            #endregion

            this.zbglNavDataSource = lst;

            this.zbglNavDataSourceXz = xz_info;

        }
    }
}
